package com.pvdnc.dxhook.guider;

import android.util.Log;

import com.pvdnc.dxhook.DxHook;

public class ByteCodeDemo {
    private static final String TAG=ByteCodeDemo.class.getSimpleName();

    private String mStr;

    public String demo(String str){
        String replace="b";
        String trimStr=str.replace("a",replace);
        Log.d(TAG,trimStr);
        mStr=str.concat(replace);
        return trimStr;
    }

    public int unboxDemo(){
        int val=3;
        val=val+1;
        Object boxed=val;
        return (int)boxed;
    }

    public int demoMethodHook(int ip1,String sp2){
        Object[] args=new Object[]{ip1,sp2};
        return (int) DxHook.handleHookedMethod("callee info json",
                this,args);
    }
}
